<template>
  <div>
    <div class="content">
      <el-carousel trigger="click" class="uni-margin-wrap" height="350px" :interval="6000" v-if="banner1.length>0">
        <el-carousel-item v-for="item,i in banner1" :key="i">
          <img class="img" :src="item.url" />
        </el-carousel-item>
      </el-carousel>
      <!-- <notice /> -->
      <div class="area-box">

        <div class=" col-sm-12  col-md-9  col-lg-9 ">
          <div class="area-top">
            <span class="area-top-lin"></span>宣传栏
          </div>
          <div class="area-con">
            <!-- <video id="myVideo" src="https://www.geem2.com/jiaocheng/插件注册.mp4" controls></video> -->
            <el-carousel trigger="click" id="myVideo" height="400px" :interval="8000" direction="vertical" v-if="banner2.length>0">
              <el-carousel-item v-for="item,i in banner2" :key="i">
                <img class="img" :src="item.url" />
              </el-carousel-item>
            </el-carousel>
          </div>
        </div>
        <div class=" col-sm-12  col-md-3  col-lg-3 ">
          <div class="area-top">
            <span class="area-top-lin"></span>最新公告
          </div>
          <div class="area-con area-r">
            <div class="con-list">
              <div class="title-con">
                <span class="title-ico"></span>
                <router-link tag="a" target="_blank" :to="{path:'./ground'}">易宝阁平台免责声明 用户在接受本平台服务前，请务必认真阅读以下声明，用户使用本平台进行交易即视为同意本声明。</router-link>
              </div>
              <div>2/15</div>
            </div>
            <div class="con-list">
              <div class="title-con">
                <span class="title-ico"></span>
                <a href="https://tsm.miit.gov.cn/" target="_blank">增值务经营许可证：鄂B2-20230097 </a>
              </div>
              <div>2/16</div>
            </div>

          </div>
        </div>

      </div>

      <!------------------------------------------>
      <div class="area-box">
        <div class=" col-sm-12  col-md-9  col-lg-9 ">
          <div class="area-top">
            <span class="area-top-lin"></span>热门店铺
          </div>
          <div class="area-con">
            <div class=" col-sm-6  col-md-4  col-lg-4 " v-for="item,i in shopList" :key="i">
              <div class="shop-list-con">
                <router-link tag="a" target="_blank" :to="{path:'./detail',query: {id: item.id}}">
                  <div class="shop-list-img">
                    <img :src="item.logoimg" />
                  </div>
                  <div class="shop-list-span title-con">
                    {{item.gameName}}
                  </div>
                </router-link>

              </div>
            </div>

          </div>
        </div>
        <div class=" col-sm-12  col-md-3  col-lg-3 ">
          <div class="area-top">
            <span class="area-top-lin"></span>最新入驻
          </div>
          <div class="area-con new-in">
            <div class="con-list" v-for="item,i in shopList" :key="i">

              <div class="con-list-left">
                <router-link tag="a" target="_blank" :to="{path:'./detail',query: {id: item.id}}">
                  <img :src="item.logoimg" />
                </router-link>
              </div>
              <div class="con-list-zhong">
                <router-link tag="a" target="_blank" :to="{path:'./detail',query: {id: item.id}}">
                  <div>{{item.gameName}}</div>
                  <!-- <div>简介：{{item.simpleText}}</div> -->
                </router-link>
              </div>
              <div class="con-list-right">
                <router-link tag="a" target="_blank" :to="{path:'./detail',query: {id: item.id}}">最新入驻</router-link>
              </div>

            </div>
          </div>

        </div>

      </div>
      <!-------------------------------------------------------->
      <!-- <div class="area-box-bottom">
        <div class="area-top">
          <span class="area-top-lin"></span>最新店铺
        </div>
        <div class="area-con">
          <div class=" col-sm-12  col-md-3  col-lg-3 " v-for="item,i in shopList" :key="i">
            <div class="shop-list-con">
              <router-link tag="a" target="_blank" :to="{path:'./detail',query: {id: item.id}}">
                <div class="shop-list-img">
                  <img :src="item.logoimg" />
                </div>
                <div class="shop-list-span title-con">
                  {{item.gameName}}
                </div>
              </router-link>
            </div>
          </div>
        </div>
      </div> -->
    </div>

  </div>
</template>

<script>
// import notice from './../../components/notice.vue'
export default {
  data () {
    return {
      shopList: '',
      banner1: '',
      banner2: ''
    }
  },
  components: {
    // notice
  },
  computed: {},
  mounted () {
    this.$apis
      .adlist({
        type: 3,
        position: 1
      })
      .then(res => {
        this.banner1 = res.data.data.list
      })
    this.$apis
      .adlist({
        type: 3,
        position: 2
      })
      .then(res => {
        this.banner2 = res.data.data.list
      })
    this.$apis.shopList().then(res => {
      this.shopList = res.data.data
    })
  },

  methods: {
    // godetail(e){
    // 	this.$router.push({path:'./detail',query:{id:e}})
    // },
    // bindNotice (e) {
    //   this.$alert(e, '公告', {
    //     confirmButtonText: '确定',
    //     callback: action => {}
    //   })
    // }
  }
}
</script>

<style lang="less" scoped>
.swiper {
  width: 100%;
  height: 920px;
  border-radius: 20px;
  overflow: hidden;
  margin-top: 40px;
}
.swiperphone {
  width: 100%;
  height: 420px;
  border-radius: 20px;
  overflow: hidden;
  margin-top: 40px;
}
.swiper img,
.swiperphone img {
  width: 100%;
  height: 100%;
}

.area-box {
  // display: flex;
  // flex-direction: row;
  // justify-content: space-between;
  margin-top: 20px;
  overflow: hidden;
}

.area-l {
  width: 830px;
  overflow: hidden;
}
.area-r {
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  box-sizing: border-box;
  height: 400px;
  overflow: hidden;
}

.area-top {
  color: #333333;
  font-size: 26px;
  margin-bottom: 20px;
}
.area-top-lin {
  width: 3px;
  height: 30px;
  background: linear-gradient(0deg, #d82141, #f36638);
  border-radius: 2px;
  margin-right: 10px;
  display: inline-block;
  vertical-align: sub;
}

#myVideo {
  width: 100%;
  height: 400px;
  border-radius: 10px;
  img {
    width: 100%;
    height: 100%;
  }
}

.con-list {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  border-bottom: 1px dashed #eeeeee;
  padding: 10px 0px;
  color: #666666;
  font-size: 12px;
  // flex-basis:auto;
}

.title-ico {
  width: 6px;
  height: 6px;
  color: #fff;
  text-align: center;
  line-height: 14px;
  display: inline-block;
  background: #bbbbbb;
  border-radius: 100%;
  margin-right: 5px;
}
.title-con {
  overflow: hidden;

  white-space: nowrap;

  text-overflow: ellipsis;

  -o-text-overflow: ellipsis;
  cursor: pointer;
}

.shop-list {
  display: flex;
  flex-flow: wrap;
  //justify-content:space-between;
}
.shop-list-con {
  width: 100%;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.5s;
}
.shop-list-con:hover {
  box-shadow: 0px 2px 15px #cfcfcf;
}

.shop-list-img {
  width: 100%;
}
.shop-list-img img {
  width: 260px;
  height: 170px;
  max-height: 170px;
}
.shop-list-span {
  background: #fff;
  font-size: 16px;
  color: #444444;
  text-align: center;
  padding: 20px 0px;
}

.con-list-right {
  width: 62px;
  height: 27px;

  border: 1px solid #fd5b75;
  border-radius: 30px;
  cursor: pointer;
  text-align: center;
  line-height: 27px;
  align-self: center;
  a {
    color: #fd5b75 !important;
  }
}
.con-list-left,
.con-list-left img {
  width: 60px;
  height: 60px;
  border-radius: 5px;
}
.con-list-zhong {
  width: 100px;
  line-height: 20px;
  overflow: hidden;
  font-size: 12px;
}
.con-list-zhong div {
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: 2px;
}

.area-con.new-in {
  height: 485px;
  overflow: hidden;
  background: #fff;
  padding: 0px 10px 10px;
  border-radius: 10px;
}

.uni-margin-wrap .img {
  width: 100%;
  height: 350px;
}
.area-box-bottom {
  overflow: hidden;
}
</style>
